package sch.frog.behavioral.observer;

public class ObserverDemo {
    public static void main(String[] args){
        Subject subject = new Subject();

        ConcreteObserverA a1 = new ConcreteObserverA("A1");
        subject.attach(a1);
        ConcreteObserverA a2 = new ConcreteObserverA("A2");
        subject.attach(a2);
        ConcreteObserverB b1 = new ConcreteObserverB("B1");
        subject.attach(b1);
        ConcreteObserverB b2 = new ConcreteObserverB("B2");
        subject.attach(b2);

        subject.doSomething();
    }
}
